package com.github.mallxhcloudauth.controller;


import com.github.api.auth.bo.UserInfoInTokenBO;
import com.github.api.auth.vo.TokenInfoVO;
import com.github.common.core.response.ServerResponseEntity;
import com.github.mallxhcloudauth.dto.UpdatePasswordDTO;
import com.github.mallxhcloudauth.manager.TokenStore;
import com.github.mallxhcloudauth.model.AuthAccount;
import com.github.mallxhcloudauth.service.AuthAccountService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Tag(name = "密码")
public class PasswordController {

	@Autowired
	private TokenStore tokenStore;

	@Autowired
	private AuthAccountService authAccountService;

	@Autowired
	private PasswordEncoder passwordEncoder;

	@PutMapping("/update_password")
	@Operation(summary = "更新密码" , description = "更新当前用户的密码, 更新密码之后要退出登录，清理token")
	public ServerResponseEntity<TokenInfoVO> updatePassword(@Valid @RequestBody UpdatePasswordDTO updatePasswordDTO) {

	}


}
